package edu.gyc.homework;


import java.util.Scanner;

public class CountNum {
    public static void main(String[] args) {
        int[] nums = new int[10];
        for (int i = 0; i < nums.length; i++) {
            nums[i]=0;
        }
        System.out.println("Input a number:");
        Scanner scanner = new Scanner(System.in);
        String s=scanner.next();
        char[] chars=s.toCharArray();
        for (char c : chars) {
            int n = c - '0';
            nums[n]++;
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.println(i+":"+nums[i]);
        }
   
        
    }
}
